package GUI_boekwerk;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Polygon;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class Tekenpaneel extends JPanel
{
	private Polygon pijl1, pijl2;
	public Tekenpaneel()
	{
		setBackground(Color.YELLOW);
		
		int[] xPijl = {50 , 100, 100, 150, 100, 100,  50};
		int[] yPijl = {100, 100, 60 , 125, 190, 150, 150};
		
		pijl1 = new Polygon(xPijl, yPijl, xPijl.length);
		
		pijl2 = new Polygon(xPijl, yPijl, xPijl.length);
		pijl2.translate(150, 0);
	}
	public void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		g.drawPolygon(pijl1);
		g.fillPolygon(pijl1);
		
		g.setColor(Color.BLUE);
		g.drawPolygon(pijl2);
		g.fillPolygon(pijl2);
	}
	
}
